More and more frequently, computers are being used to perform various information location and retrieval tasks. Commonly, these information location and retrieval tasks have primarily been in the domain of specialized applications that have been constructed to perform queries against a relational database using a specialized query language. Among the most common of such query languages is the structured query language (SQL). However, recent and dramatic advances in computing technology, for example, increases in processor power and speed and increases in information storage capabilities, have enabled a greater range of information location and retrieval applications on a wider variety of computers.
Traditionally, there have been two main approaches to include information location and retrieval abilities in compiled applications that are written in a high-level programming language. In accordance with the first approach, text of queries written in a query language such as SQL can be encoded as strings within a compiled application program. During execution of the program, text of the query can be passed to a function from an application programming interface (API) that can pass the query to a database to obtain information that result from performance of the query. With the second approach, an embedded text representation of a query is extracted from a source code file by a compiler. The compiler rewrites the query to use an API and re-encodes the query as a text string. These existing techniques suffer from complexity, poor performance, and inexact error reporting.
Recently, querying languages such as extended structured query language (eSQL) and language integrated query (LINQ) have been developed that allow queries of conceptual data, unlike SQL that is intended for pure relational data. Rather than merely getting back fixed number of columns with simple values interpreted for each position, these newer querying languages can get back type information. This capability is leveraged in a platform supporting transformation of data from one domain to another, for instance an Object Relational Mapping System, where large amounts of data needs to be efficiently transformed from one shape to another, for example from relational rows to arbitrarily structured results.
One approach for supporting such queries is to compile a query plan into a procedural method in order to obtain the processing efficiencies. However, such an approach suffers from the complexities of compiling procedures and often has poor error handling. Another approach has been a live interpretation of a description of a pattern with respect to the data, which avoids some of the complexities of compiling procedural methods but lacks the efficiencies of precompiled paths.